﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RemotableObjects
{
    public class Player : MarshalByRefObject
    {        
        List<TreasureHolder> treasureList = new List<TreasureHolder>();

        public string PlayerName { get; set; }
        
        public int NumberOfMovement { get; set; }

        public void SetCollectedTreasure(MazeCell cell, int treasureCount)
        {
            TreasureHolder treasure = new TreasureHolder(cell, treasureCount);
            treasureList.Add(treasure);            
        }

        public int GetTotalNumberOfTreasure()
        {
            return treasureList.Sum(item => item.TreasureCount);
        }
    }
}
